/**
 * 服务器地址
 */
export  const serverUrl ='https://hdf-app-server.penkuoer.com/'

/**
 * 图片上传路径
 */
export const uploadActionUrl =serverUrl+'/common/upload'
/**
 * 
 * @param img 处理图片数据
 * @returns 
 */
export const dalImg=(img: string)=>{
  if(img){
 if(img.startsWith('http'))   return img; 
  return serverUrl +img
 
  }else{
    return 'https://img2.baidu.com/it/u=3673224267,1512865004&fm=253&fmt=auto&app=138&f=JPEG?w=200&h=200'
  }
 
}

export const setToken =(token: string) =>sessionStorage.setItem('token',token)

export const getToken =()=>sessionStorage.getItem('token')